#!/usr/bin/env python

class Cookie:
    """
    This class has the attributes of Cookie object and there corresponding
    getter and setters.
    
     @cvar __state: State of Cookie. Active/Inactive
     
     @cvar __type: type of cookie. Session/Machine cookie
     
     @cvar __principal_id: Id of the principal as in the database
     
     @cvar __id: ID of the cookie as in the database
    """
    
    __id = None
    __state = None
    __type = None
    __principal_id = None
    __modification_time = None   
   
    def __init__(self, state, type, principal_id, modification_time, id):
        self.__state = state
        self.__type = type
        self.__principal_id = principal_id
        self.__modification_time = modification_time
        self.__id = id
    
    def getState(self):
        return self.__state
    
    def setState(self, state):
        self.__state = state

    def getType(self):
        return self.__type
    
    def setType(self, type):
        self.__type = type
    
    def getPrincipalId(self):
        return self.__principal_id
    
    def setType(self, principalId):
        self.__principal_id = principalId
    
    def getModificationTime(self):
        return self.__modification_time
    
    def setModificationTime(self, mod_time):
        self.__modification_time = mod_time
    
    def getId(self):
        return self.__id
    
    def setId(self, id):
        self.__id = id
        
        
class IBroker:
    """
    This class has the attributes of Ibroker object and there corresponding
    getter and setters.
    
     @cvar __state: State of Cookie. Active/Inactive
     
     @cvar __ibroker_id: ID of the Ibroker as in the database
     
     @cvar __data: Dictionary of type.  {item_name : url}
     
    """
    __state = None
    __id = None
    __data = None
    
    def __init__(self, state, ibroker_id, data):
        self.__state = state
        self.__id = ibroker_id
        self.__data = data
    
    def getState(self):
        return self.__state
    
    def setState(self, state):
        self.__state = state
    
    def getData(self):
        return self.__data
    
    def setData(self, data):
        self.__data = data
   
    def getId(self):
        return self.__id
    
    def setId(self, id):
        self.__id = id
        

class Principal:
    """
    This class has the attributes of principal and there corresponding getters
    and setter.
    
     @cvar __id: Id of the principal as in the database
     
     @cvar __ibroker_id: ID of the Ibroker as in the database
     
     @cvar __state: State of principal
     
    """
    __id = None
    __ibroker_id = None
    __state = None
    __password = None
    
    def __init__(self, id, ibroker_id, state, password):
        self.__id = id
        self.__ibroker_id = ibroker_id
        self.__state = state
        self.__password = password
    
    def getId(self):
        return self.__id
    
    def setId(self, id):
        self.__id = id
    
    def getIBroker_id(self):
        return self.__ibroker_id
    
    def setIBroker_id(self, ibroker_id):
        self.__ibroker_id = ibroker_id

    def getState(self):
        return self.__state
    
    def setState(self, state):
        self.__state = state
    
    def getPassword(self):
        return self.__password

    def setPassword(self, password):
        self.__password = password